xend: fix avoidance to restart domain on crash
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 15 Apr 2009 10:23:02 +0000 (11:23 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 15 Apr 2009 10:23:02 +0000 (11:23 +0100)
commitb158b87dbedc458adade946653aebcda9e99a5af
treedf266109cd05a0bd81ce8ca190611ee445991eca
parente2d6c4bd8adb3e8a87590c2815bb3f648af312db
xend: fix avoidance to restart domain on crash

If a qemu-dm dies immediately (probably by wrong setting),
xend repeats to restart a domain so many times.=20
That causes system overload.

There is already a logic to avoid too early restarting, however,
it might not work. Since xenstore entry 'xend/previous_restart_time'
is volatile. XendDomainInfo.destroy() which removes the entry from
xenstore is called in some places.

Also, this patch prevents too early restarting even at the first
domain creation.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
tools/python/xen/xend/XendDomainInfo.py